package com.my.chapter8;

public class practice10 {
    public static void main(String[] args) {
        Type t =new A();
        t.display();
    }
}

class Type{
    public void display(){
        System.out.print("Type.display(); ");
        eat();
    }
    public void eat(){
        System.out.println("Type.eat()");
    }
}

class A extends Type{
    public void eat(){
        System.out.println("A.eat()");
    }
}
